package dp;

public class _01_509_斐波那契数列 {
    static int N = 40;
    static int dp[] = new int[N];
    public static int fib(int n) {
        dp[1] = 1;
        dp[2] = 1;
        for(int i = 3; i <= n; i++) {
            dp[i] = dp[i-1] + dp[i-2];
        }
        return dp[n];
    }
    
    public static void main(String[] args) {
		System.out.println(fib(4));
	}
}
